# temperature conversion
# Celsius to Fahrenheit
# Fahrenheit to Celsius
temp = input("Enter temperature: ")
if temp[-1] == "C" or temp[-1] == "c":
    print("Converting to F")
    result = float(temp[:-1]) * 1.8 + 32
    print(result)
elif temp[-1] == "F" or temp[-1] == "f":
    print("Converting to C")
    result = (float(temp[:-1]) - 32) * 1.8
    print(result)
else:
    print("Invalid input")
    exit(1)

